<div class="panel panel-info" style="margin-bottom: 0">
    <div class="panel-heading text-center">
        {{curTextStyle.name+"_"+curTextStyle.code}}
        <button class="btn btn-primary pull-right" ng-click="addRule(curTextStyle)">添加</button>
        <!--<button class="btn btn-info pull-right" ng-click="addPhotos(pageModel,{'typeId':curType.id,'multiple':true })" >复制此样式</button>-->
    </div>
    <div class="panel-body" style="padding:0">
        <table class="table table-bordered table-striped table-hover" style="margin-bottom: 0">
            <thead class="title">
            <tr>
                <th class="text-center">NO</th>
                <th th-check items="curTextStyle.data" class="text-center" style="width:20px"></th>
                <th><span uib-tooltip="scale">级别</span></th>
                <th><span uib-tooltip="font-name">字体名称</span></th>
                <th><span uib-tooltip="font-size">字体大小</span></th>
                <th><span uib-tooltip="font-color">字体前景色</span></th>
                <th><span uib-tooltip="font-weight">字体粗细</span></th>
                <th><span uib-tooltip="font-style">字体样式</span></th>
                <th><span uib-tooltip="halosize">光晕密度</span></th>
                <th><span uib-tooltip="bgsize">背景框加边</span></th>
                <th><span uib-tooltip="halocolor">光晕</span></th>
                <th><span uib-tooltip="density">文字疏密度</span></th>
                <th><span uib-tooltip="fillarc">圆弧大小</span></th>
                <th style="width:120px">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-if="!curTextStyle.data || curTextStyle.data.length == 0">
                <td colspan="100" class="text-center">暂无记录</td>
            </tr>
            <tr ng-repeat-start="item in curTextStyle.data" ng-if="!item.edit">
                <td class="text-center">{{$index + 1}}</td>
                <td td-check item="item"></td>
                <td>{{item.scale}}</td>
                <td>{{item.fontName|fontFilter:curInstance}}</td>
                <td>{{item.fontSize}}</td>
                <td color-trans color-id="item.fontColor" instance='curInstance' element-id="'text'"></td>
                <td>{{item.fontWeight|keyToValue:fontWeightDict}}</td>
                <td>{{item.fontStyle|keyToValue:fontStyleDict}}</td>
                <td>{{item.halosize}}</td>
                <td>{{item.bgsize}}</td>
                <td color-trans color-id="item.halocolor" instance='curInstance' element-id="'text'"></td>
                <td>{{item.density}}</td>
                <td>{{item.fillarc}}</td>
                <td>
                    <a href='javascript:void(0)' ng-click='editRule(item)' class='btn btn-xs btn-link'><span
                            class='fa fa-edit'></span>编辑</a>
                    <a href='javascript:void(0)' ng-click='delRule(style,item)' class='btn btn-xs btn-link'><span
                            class='fa fa-trash'></span>删除</a>
                </td>
            </tr>
            <tr ng-repeat-end ng-if="item.edit" ng-form name="form" novalidate>
                <td class="text-center">{{$index + 1}}</td>
                <td td-check item="item"></td>
                <td>
                    <input type="text" class="form-control" ng-model="item.copy.scale" ng-pattern="/^[\d]+,[\d]+$/i"
                           required>
                </td>
                <td><select class="form-control" ng-model="item.copy.fontName" required
                            ng-options="o.id as o.name for o in listDicts('font')">
                    <option value="">--请选择--</option>
                </select>
                </td>
                <td><input type="number" class="form-control" ng-model="item.copy.fontSize" required></td>
                <td>
                    <color-selector host="item.copy" key="'fontColor'" instance='curInstance'
                                    element-id="'text'"></color-selector>
                </td>
                <td><select class="form-control" ng-model="item.copy.fontWeight" required
                            ng-options="o[0] as o[1] for o in fontWeightDict">
                    <option value="">--请选择--</option>
                </select>
                </td>
                <td><select class="form-control" ng-model="item.copy.fontStyle" required
                            ng-options="o[0] as o[1] for o in fontStyleDict">
                    <option value="">--请选择--</option>
                </select>
                </td>
                <td><input type="number" class="form-control" ng-model="item.copy.halosize" required></td>
                <td><input type="number" class="form-control" ng-model="item.copy.bgsize" required></td>
                <td>
                    <color-selector host="item.copy" key="'halocolor'" instance='curInstance'
                                    element-id="'text'"></color-selector>
                </td>
                <td><input type="number" class="form-control" ng-model="item.copy.density" required></td>
                <td><input type="number" class="form-control" ng-model="item.copy.fillarc" required></td>
                <td>
                    <a href='javascript:void(0)' ng-click="saveRule(form,item,'../rule/saveRuleText')"
                       class='btn btn-xs btn-link text-primary'><span class='fa fa-save'></span>保存</a>
                    <a href='javascript:void(0)' ng-click="cancelRule(style,item)"
                       class='btn btn-xs btn-link text-danger'><span class='fa fa-undo'></span>取消</a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>